﻿using System;
using System.Collections.Generic;
using System.Text;
using Slc.Core.Entity;
using Slc.Core.DataProvider;

namespace Slc.Core.IDAL
{
    /// <summary>
    /// 实体类查询接口
    /// </summary>
    public interface IEntityQuery
    {
        AdoHelper DefaultDataBase { get; set; }
        int Delete(EntityBase entity);
        int Delete(System.Collections.Generic.List<EntityBase> entityList);
        int Delete(EntityBase entity, CommonDB db);
        int ExecuteOql(Entity.OQL oql);
        bool ExistsEntity(EntityBase entity);
        bool FillEntity(EntityBase entity);
        int Insert(System.Collections.Generic.List<EntityBase> entityList);
        int Insert(EntityBase entity);
        int Insert(EntityBase entity, CommonDB db);
        int Save(CommonDB db, params object[] fields);
        int Save(params object[] fields);
        int SaveAllChanges();
        int SaveAllChanges(CommonDB db);
        int Update(System.Collections.Generic.List<EntityBase> entityList);
        int Update(EntityBase entity, CommonDB db);
        int Update(EntityBase entity);
    }
}
